In [4]:
%matplotlib inline
In [2]:
import os
import numpy as np
import pandas as pd
import nibabel as nib
import matplotlib.pyplot as plt
import nipype.interfaces.fsl as fsl  # fsl
from nipype import Node, Workflow  # components to construct workflow
from nipype.interfaces.io import DataSink  # datasink
from nilearn.plotting import plot_stat_map, view_img
from nilearn.image import math_img, coord_transform


# PARAMETERS
zThresh = 2.3  # a.k.a., p=0.01 uncorrected threshold
contInd = '1'  # contrast of interest

# FILE AND DIRECTORY BUSINESS
# original data directory
dataDir = '/tmp/Data/ds114'
# Output directory
outDir = os.path.join(dataDir,'WorkflowOutput')
# Datasink directory
datasinkDir = os.path.join(outDir,'OVGvsOWR_Test')
# stats_dir directory
statsDir = os.path.join(datasinkDir,'stats_dir/stats')
# Z-stat image
imgZStat = os.path.join(statsDir, 'zstat' + contInd + '.nii.gz')


# FINDING CLUSTERS IN THE ANALYSIS RESULTS
# cluster node
cluster = Node(fsl.Cluster(in_file=imgZStat,
                           threshold=zThresh,
                           out_index_file=True,
                           out_threshold_file=True,
                           out_localmax_txt_file=True),
               name='cluster')

# data sink node
datasink = Node(DataSink(base_directory=statsDir),
                name='datasink')

# workflow connecting clustering to the datasink
clusterWF = Workflow(name="clusterWF", base_dir=outDir)
clusterWF.connect(cluster, 'index_file', datasink, 'index_file')
clusterWF.connect(cluster, 'threshold_file', datasink, 'threshold_file')
clusterWF.connect(cluster, 'localmax_txt_file', datasink, 'localmax_txt_file')
clusterWF.run()
/usr/local/lib/python3.5/dist-packages/sklearn/externals/joblib/__init__.py:15: DeprecationWarning: sklearn.externals.joblib is deprecated in 0.21 and will be removed in 0.23. Please import this functionality directly from joblib, which can be installed with: pip install joblib. If this warning is raised when loading pickled models, you may need to re-serialize those models with scikit-learn 0.21+.
  warnings.warn(msg, category=DeprecationWarning)
191114-19:24:38,138 nipype.workflow INFO:
	 Workflow clusterWF settings: ['check', 'execution', 'logging', 'monitoring']
191114-19:24:38,144 nipype.workflow INFO:
	 Running serially.
191114-19:24:38,145 nipype.workflow INFO:
	 [Node] Setting-up "clusterWF.cluster" in "/tmp/Data/ds114/WorkflowOutput/clusterWF/cluster".
191114-19:24:38,147 nipype.workflow INFO:
	 [Node] Outdated cache found for "clusterWF.cluster".
191114-19:24:38,158 nipype.workflow INFO:
	 [Node] Running "cluster" ("nipype.interfaces.fsl.model.Cluster"), a CommandLine Interface with command:
cluster --in=/tmp/Data/ds114/WorkflowOutput/OVGvsOWR_Test/stats_dir/stats/zstat1.nii.gz --oindex=/tmp/Data/ds114/WorkflowOutput/clusterWF/cluster/zstat1_index.nii.gz --olmax=/tmp/Data/ds114/WorkflowOutput/clusterWF/cluster/zstat1_localmax.txt --othresh=/tmp/Data/ds114/WorkflowOutput/clusterWF/cluster/zstat1_threshold.nii.gz --thresh=2.3000000000
191114-19:24:38,232 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.232083:Cluster Index	Voxels	MAX	MAX X (vox)	MAX Y (vox)	MAX Z (vox)	COG X (vox)	COG Y (vox)	COG Z (vox)
191114-19:24:38,234 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:120	523	6.31	12	35	28	15	37.8	29.1
191114-19:24:38,235 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:119	254	7.44	16	14	31	15	16.6	30.6
191114-19:24:38,236 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:118	198	4.9	18	18	14	26.5	22.5	13.9
191114-19:24:38,237 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:117	158	5.09	10	17	15	12.3	18.3	18.7
191114-19:24:38,238 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:116	136	4.51	26	33	20	25.7	37.8	19.8
191114-19:24:38,240 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:115	49	4.44	23	16	23	21.8	15.9	22
191114-19:24:38,241 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:114	40	3.84	31	37	30	29.8	38.3	27.7
191114-19:24:38,242 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:113	31	4.04	16	47	27	16.1	46.5	24.4
191114-19:24:38,244 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:112	28	4.06	30	32	29	29.8	32.2	29.5
191114-19:24:38,245 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:111	24	4.73	16	27	13	16.5	26.9	14.3
191114-19:24:38,246 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:110	19	4.01	13	26	35	13	25.9	34.7
191114-19:24:38,247 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:109	16	3.7	20	42	20	20.4	42.2	18.9
191114-19:24:38,248 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:108	12	4.06	22	9	25	21.2	10.1	24.6
191114-19:24:38,249 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:107	11	3.19	13	21	14	13.8	21.7	14.3
191114-19:24:38,250 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:106	11	3.5	22	31	17	22.4	31.1	18.1
191114-19:24:38,251 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:105	10	3.25	34	23	20	33.5	22.8	19.6
191114-19:24:38,252 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:104	10	3.56	18	26	28	17.2	27	28
191114-19:24:38,253 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:103	9	3.32	28	14	21	28.6	13.8	20.7
191114-19:24:38,254 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:102	8	3.96	11	27	28	10.9	26.4	28
191114-19:24:38,255 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:101	8	3.23	18	18	24	18.1	17.1	23.6
191114-19:24:38,256 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:100	8	3.09	31	15	29	31.5	14.5	28.7
191114-19:24:38,257 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:99	8	3.54	35	36	14	34.7	35.4	14.1
191114-19:24:38,258 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:98	8	3.43	32	40	15	32.4	40.4	15.3
191114-19:24:38,259 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:97	7	4.35	15	39	14	14.9	39.4	14.7
191114-19:24:38,260 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:96	7	3	20	29	35	20.6	29.4	36
191114-19:24:38,261 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:95	7	3.49	20	24	12	20	23.7	12.2
191114-19:24:38,262 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:94	6	3.04	28	22	24	27.8	22.1	23.7
191114-19:24:38,263 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:93	5	3.27	19	22	38	19.2	22.2	37.8
191114-19:24:38,264 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:92	5	2.89	23	34	27	22.6	34.6	26.8
191114-19:24:38,265 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:91	4	3.62	37	34	24	36.6	34	24
191114-19:24:38,266 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:90	4	3.03	16	20	35	15.5	19.8	35.7
191114-19:24:38,267 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:89	4	3.43	17	26	33	16.8	25.3	33.2
191114-19:24:38,268 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:88	4	3.45	33	9	20	32.7	9.23	19.8
191114-19:24:38,269 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:87	4	2.91	19	28	18	19.5	28.5	18
191114-19:24:38,270 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:86	4	2.59	38	21	18	37.5	21.5	18
191114-19:24:38,271 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:85	4	3.76	30	26	25	29.5	25.8	25.2
191114-19:24:38,271 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:84	4	3.23	22	40	25	22.2	40	25.5
191114-19:24:38,273 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:83	4	4.08	36	33	17	36	33	17.4
191114-19:24:38,273 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:82	4	2.75	36	16	18	36.3	15.7	17.8
191114-19:24:38,274 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:81	4	2.64	27	12	25	28.2	12.2	25.7
191114-19:24:38,276 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:80	4	3.23	13	26	15	13	26.5	15.2
191114-19:24:38,277 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:79	3	2.9	37	27	29	37	28	28.7
191114-19:24:38,278 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:78	3	2.56	30	39	15	31	38.3	14.3
191114-19:24:38,279 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:77	3	2.56	27	41	31	27.3	41	30.7
191114-19:24:38,280 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:76	3	2.72	31	17	23	31	16.7	22.7
191114-19:24:38,281 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:75	3	2.89	21	23	24	21	23	24
191114-19:24:38,282 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:74	3	3.07	18	43	25	17.4	43	24.7
191114-19:24:38,283 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:73	3	3.41	33	23	34	32.7	22.4	34
191114-19:24:38,284 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:72	3	3.15	29	15	35	29.3	15.3	35
191114-19:24:38,284 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:71	2	2.7	18	41	28	18	40.5	28.5
191114-19:24:38,286 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:70	2	2.32	35	25	36	34.5	25.5	36
191114-19:24:38,287 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:69	2	2.81	25	39	23	25.5	39.5	23
191114-19:24:38,288 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:68	2	2.82	29	21	36	29	21	36.5
191114-19:24:38,289 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:67	2	2.63	33	38	34	33	37.5	34
191114-19:24:38,289 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:66	2	3.18	35	32	26	35	32	26.4
191114-19:24:38,290 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:65	2	3.32	31	30	26	31	30.5	26
191114-19:24:38,291 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:64	2	2.53	10	14	26	10	14.5	26
191114-19:24:38,292 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:63	2	2.44	21	49	25	21	49.5	25.5
191114-19:24:38,293 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:62	2	3.09	31	23	32	30.5	23	32
191114-19:24:38,294 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:61	2	2.64	11	34	24	11	33.5	24
191114-19:24:38,295 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:60	2	2.54	19	9	17	19	9	17.5
191114-19:24:38,296 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:59	2	2.82	9	34	14	9	34.5	14
191114-19:24:38,297 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:58	2	3.31	37	36	17	37.4	36	16.6
191114-19:24:38,298 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:57	2	2.7	11	32	14	10.5	32	14
191114-19:24:38,299 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:56	2	2.95	32	35	16	32	34.6	16
191114-19:24:38,300 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:55	2	2.59	37	31	14	36.5	31	14
191114-19:24:38,301 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:54	2	3.02	34	24	14	34	24.4	14
191114-19:24:38,303 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:53	2	3.36	14	47	21	14.4	47	21
191114-19:24:38,303 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:52	2	2.88	21	27	38	21	26.5	38
191114-19:24:38,304 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:51	2	2.9	19	40	17	18.5	40	17
191114-19:24:38,305 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:50	2	2.5	38	18	16	38	17.5	16
191114-19:24:38,306 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:49	1	2.61	24	25	29	24	25	29
191114-19:24:38,307 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:48	1	2.38	26	28	15	26	28	15
191114-19:24:38,308 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:47	1	2.56	19	29	28	19	29	28
191114-19:24:38,309 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:46	1	3.62	19	29	15	19	29	15
191114-19:24:38,309 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:45	1	2.75	17	31	29	17	31	29
191114-19:24:38,310 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:44	1	2.46	23	32	29	23	32	29
191114-19:24:38,311 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:43	1	2.39	32	28	30	32	28	30
191114-19:24:38,312 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:42	1	2.36	36	39	30	36	39	30
191114-19:24:38,313 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:41	1	2.35	21	26	15	21	26	15
191114-19:24:38,313 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:40	1	2.7	31	22	28	31	22	28
191114-19:24:38,314 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:39	1	2.69	34	27	31	34	27	31
191114-19:24:38,315 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:38	1	2.69	30	45	31	30	45	31
191114-19:24:38,316 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:37	1	2.33	36	22	15	36	22	15
191114-19:24:38,317 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:36	1	2.55	38	33	14	38	33	14
191114-19:24:38,318 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:35	1	4.66	21	32	14	21	32	14
191114-19:24:38,319 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:34	1	3.03	13	17	14	13	17	14
191114-19:24:38,320 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:33	1	2.77	14	36	13	14	36	13
191114-19:24:38,321 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:32	1	3.1	14	29	13	14	29	13
191114-19:24:38,322 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:31	1	2.47	12	36	12	12	36	12
191114-19:24:38,322 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:30	1	2.36	31	24	37	31	24	37
191114-19:24:38,323 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:29	1	3.05	18	25	39	18	25	39
191114-19:24:38,324 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:28	1	2.6	23	46	30	23	46	30
191114-19:24:38,325 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:27	1	2.96	16	9	23	16	9	23
191114-19:24:38,326 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:26	1	2.31	11	36	22	11	36	22
191114-19:24:38,327 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:25	1	2.32	15	17	23	15	17	23
191114-19:24:38,328 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:24	1	2.37	16	22	23	16	22	23
191114-19:24:38,328 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:23	1	2.57	20	10	22	20	10	22
191114-19:24:38,329 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:22	1	2.52	19	31	23	19	31	23
191114-19:24:38,330 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:21	1	2.57	40	37	23	40	37	23
191114-19:24:38,331 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:20	1	3.06	32	43	21	32	43	21
191114-19:24:38,332 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:19	1	2.45	13	45	23	13	45	23
191114-19:24:38,332 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:18	1	2.38	27	18	21	27	18	21
191114-19:24:38,333 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:17	1	2.45	32	19	20	32	19	20
191114-19:24:38,334 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:16	1	2.41	26	26	19	26	26	19
191114-19:24:38,335 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:15	1	2.59	39	20	16	39	20	16
191114-19:24:38,336 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:14	1	2.95	25	45	18	25	45	18
191114-19:24:38,336 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:13	1	2.38	28	9	25	28	9	25
191114-19:24:38,337 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:12	1	2.46	41	23	18	41	23	18
191114-19:24:38,338 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:11	1	2.73	17	44	17	17	44	17
191114-19:24:38,339 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:10	1	2.41	38	42	25	38	42	25
191114-19:24:38,340 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:9	1	2.56	32	28	17	32	28	17
191114-19:24:38,340 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:8	1	2.85	22	21	26	22	21	26
191114-19:24:38,341 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:7	1	3.78	20	36	16	20	36	16
191114-19:24:38,342 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:6	1	2.41	8	29	16	8	29	16
191114-19:24:38,343 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:5	1	2.51	30	23	16	30	23	16
191114-19:24:38,343 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:4	1	2.37	24	32	27	24	32	27
191114-19:24:38,344 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:3	1	2.45	19	34	27	19	34	27
191114-19:24:38,345 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:2	1	2.56	10	15	28	10	15	28
191114-19:24:38,346 nipype.interface INFO:
	 stdout 2019-11-14T19:24:38.234449:1	1	2.34	12	15	19	12	15	19
191114-19:24:38,487 nipype.workflow INFO:
	 [Node] Finished "clusterWF.cluster".
191114-19:24:38,488 nipype.workflow INFO:
	 [Node] Setting-up "clusterWF.datasink" in "/tmp/Data/ds114/WorkflowOutput/clusterWF/datasink".
191114-19:24:38,491 nipype.workflow INFO:
	 [Node] Outdated cache found for "clusterWF.datasink".
191114-19:24:38,495 nipype.workflow INFO:
	 [Node] Running "datasink" ("nipype.interfaces.io.DataSink")
191114-19:24:38,500 nipype.workflow INFO:
	 [Node] Finished "clusterWF.datasink".
Out[2]:
<networkx.classes.digraph.DiGraph at 0x7f7a55bb7f98>
In [5]:
# VISUALIZATION
# T1 weighted image for background
anatDir = os.path.join(dataDir,'derivatives_selected/fmriprep/sub-09/anat/')
imageT1 = os.path.join(anatDir,
                       'sub-09_space-MNI152NLin2009cAsym_desc-preproc_T1w.nii.gz')

# Thresholded zstat image
fThZStat=os.path.join(statsDir,'threshold_file/zstat' + contInd + '_threshold.nii.gz')
thImageStat=nib.load(fThZStat)

# global maximum cooridnates
X_zstat = nib.load(imgZStat).get_data()  # loading the zstat image
globalMax = np.unravel_index(np.argmax(X_zstat), X_zstat.shape) # voxel space
globalMaxMNI = coord_transform(globalMax[0],
                               globalMax[1],
                               globalMax[2],
                               thImageStat.affine)  # MNI space

# blob overlay at global max
plot_stat_map(thImageStat, bg_img=imageT1,
              colorbar=True, threshold=2.3, black_bg=True,
              draw_cross=True,
              cut_coords=globalMaxMNI)
Out[5]:
<nilearn.plotting.displays.OrthoSlicer at 0x7f7a546ee518>
In [6]:
# interactive visualization
view_img(thImageStat, bg_img=imageT1, cmap='black_red',
         symmetric_cmap=False, annotate=True,
         colorbar=True, threshold=2.3, black_bg=True,
         cut_coords=globalMaxMNI)
Out[6]:
In [ ]: